//var menuTree;
var prefix = basepath + "/production"

var menuIds;
var enterpriseList;
var compPreviligeList;
var allinpayPreviligeList;
$(function() {
//	getMenuTreeData();
//	validateRule();
});
$.validator.setDefaults({
	submitHandler : function() {
//		getAllSelectNodes();
		save();
	}
});




function save() {
	$('#menuIds').val(menuIds);
	var role = $('#signupForm').serialize();
	$.ajax({
		cache : true,
		type : "POST",
		url : prefix + "/addEnterpriseProd",
		data : role, // 你的formid

		async : false,
		error : function(request) {
			alert("Connection error");
		},
		success : function(data) {
			if (data.code == 0) {
				parent.layer.msg("操作成功");
//				sleep(3000);
//				parent.reload();
				var index = parent.layer.getFrameIndex(window.name);
				parent.layer.close(index);

			} else {
				parent.layer.msg(data.msg);
			}
		}
	});
}



